package com.shuai.jit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuai.jit.entity.school.SysArea;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 行政区划分表,用于省市县的选择 Mapper 接口
 * </p>
 *
 * @author joker
 * @since 2021-01-21
 */
@Mapper
public interface SysAreaMapper extends BaseMapper<SysArea> {

    @Select("select * from sys_area where dis_name like concat(#{name},'%') and super_id='402881ea3f5b1d14013f5b1fdc080006' ")
    SysArea findByName(String name);

    @Select("SELECT * FROM sys_area where super_id=#{pid}")
    List<SysArea> findByPid(String pid);

}
